//
//  BPMediator.h
//  AFNetworking
//
//  Created by 404 on 2020/7/31.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface BPMediator : NSObject

+ (instancetype)sharedInstance;

/// 远程调用组件入口
/// @param url  aaa://targetA/actionA?id=1234
/// @param completion 回调1
- (id)performActionWithUrl:(NSURL *)url completion:(void(^)(NSDictionary *info))completion;

/// 本地组件点用入口
/// @param targetName targetString
/// @param actionName actionString
/// @param params params
/// @param shouldCacheTarget 是否缓存
- (id)performTarget:(NSString *)targetName action:(NSString *)actionName params:(NSDictionary *)params shouldCacheTarget:(BOOL)shouldCacheTarget;

/// 根据target清理缓存
/// @param targetName target
- (void)releaseCachedTargetWithTargetName:(NSString *)targetName;


@end

NS_ASSUME_NONNULL_END
